//验证输入字符
function checkZmOrNumorchinese(){
    var zmnum=this.value;
    var zmnumReg=/^[A-Za-z0-9\u4e00-\u9fa5]+$/gi;
    if(zmnum!=""&&!zmnumReg.test(zmnum)){
    alert("只能输入字母或汉字或数字,请重新输入");
    return false;
    }
    };

$('input[name="name"]').blur(checkZmOrNumorchinese);
//验证密码重复

function passwordvalidate() {
    var theOther=this.id
    var repeat=(function () {
        if(theOther=="InputPassword1"){
            return "InputPassword2"
        }
        else{
            return "InputPassword1"
        }     
    })();
    var theOtherValue=document.getElementById(repeat).value;
    if(this.value!=theOtherValue&&theOtherValue!==""){
        alert("两次密码不一致，请重新输入");
    };
    
};

$('input[type="password"]').blur(passwordvalidate);